home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -serious- / workbench / directoryopus4 / dopus4_src / include / dopus / stringdata.h < prev   
C/C++ Source or Header  |  2000-03-11  |  3KB  |  81 lines

  1. #ifndef DOPUS_STRINGDATA_H
  2. #define DOPUS_STRINGDATA_H
  3.  
  4. /*
  5.  
  6. Directory Opus 4
  7. Original GPL release version 4.12
  8. Copyright 1993-2000 Jonathan Potter
  9.  
  10. This program is free software; you can redistribute it and/or
  11. modify it under the terms of the GNU General Public License
  12. as published by the Free Software Foundation; either version 2
  13. of the License, or (at your option) any later version.
  14.  
  15. This program is distributed in the hope that it will be useful,
  16. but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18. GNU General Public License for more details.
  19.  
  20. You should have received a copy of the GNU General Public License
  21. along with this program; if not, write to the Free Software
  22. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  23.  
  24. All users of Directory Opus 4 (including versions distributed
  25. under the GPL) are entitled to upgrade to the latest version of
  26. Directory Opus version 5 at a reduced price. Please see
  27. http://www.gpsoft.com.au for more information.
  28.  
  29. The release of Directory Opus 4 under the GPL in NO WAY affects
  30. the existing commercial status of Directory Opus 5.
  31.  
  32. */
  33.  
  34. /* Structure used by programs internally to define the default strings */
  35.  
  36. struct DefaultString {
  37.     USHORT string_id;                /* Unique ID number for this string */
  38.     char *string;                    /* Pointer to the string itself */
  39. };
  40.  
  41.  
  42. /* Data structure passed to the string routines */
  43.  
  44. struct StringData {
  45.     struct DefaultString             /* Pointer to array of default strings */
  46.         *default_table;
  47.     int string_count;                /* Number of strings in the table */
  48.  
  49.     char **string_table;             /* This will point to the table of
  50.                                         string pointers to actually use */
  51.  
  52.     char *string_buffer;             /* Buffer of loaded string file */
  53.     ULONG string_size;               /* Size of buffer */
  54.  
  55.     int min_version;                 /* Minimum version to recognise */
  56. };
  57.  
  58.  
  59. /* IFF definitions for the external string file */
  60.  
  61. #define ID_OSTR MAKE_ID('O','S','T','R')
  62. #define ID_STHD MAKE_ID('S','T','H','D')
  63. #define ID_STRN MAKE_ID('S','T','R','N')
  64.  
  65. typedef struct StringFile_Header {
  66.     ULONG header_id;         /* STHD */
  67.     ULONG header_size;
  68.     ULONG version;
  69.     ULONG stringcount;
  70.     ULONG flags;
  71.     char  language[20];
  72. } StringHeader;
  73.  
  74. typedef struct StringFile_String {
  75.     ULONG chunk_id;          /* STRN */
  76.   ULONG chunk_size;
  77.   ULONG string_id;
  78. } String;
  79.  
  80. #endif /* DOPUS_STRINGDATA_H */
  81.